"""
@Time: 2021/1/25 下午 7:51
@Author: jinzhuan
@File: baidu.py
@Desc: 
"""
import sys
sys.path.append('/data/zhuoran/code/cognlp')
from cognlp.io.loader.re.baidu import BaiduRelationLoader
from cognlp.io.processor.re.baidu import BaiduRelationProcessor

loader = BaiduRelationLoader()
train_data, dev_data, test_data = loader.load_all('../../../../cognlp/data/re/baidu/data')
processor = BaiduRelationProcessor(label_list=loader.get_labels(), path='../../../../cognlp/data/re/baidu/data')


# train_datable = processor.process(train_data)
dev_datable = processor.process(dev_data)
dev_datable.save_table('../../../../cognlp/data/re/baidu/data/train.json')
# test_datable = processor.process(test_data)
print(1)
